package com.yanqu.road.server.cmd.activity.lanyamemorial;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.LangYaMemorialProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.langyamemorial.LangYaMemorialModule;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_LANGYA_MEMORIAL_BUILD_FROM_CROSS, desc = "建阁")
public class LangYaMemorialBuildFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {

        LangYaMemorialProto.CrossLangYaMemorialBuildRespMsg respMsg = LangYaMemorialProto.CrossLangYaMemorialBuildRespMsg.parseFrom(packet.getBytes());

        ret = player.getModule(LangYaMemorialModule.class).buildAtticFromCross(respMsg.getConsume(), respMsg.getCommonTimes(), respMsg.getTypeList(), respMsg.getListList());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
